#ifndef  __UTILS_H
#define  __UTILS_H

#include "junix.h"

void print_stat(const struct stat *st)
{
	fprintf(stdout,"dev:   %ld\n", (long)st->st_dev);
	fprintf(stdout,"ino:   %ld\n", st->st_ino);
	fprintf(stdout,"mode:  %#08o\n", st->st_mode);
	fprintf(stdout,"nlink: %ld\n", (long)st->st_nlink);
	fprintf(stdout,"size:  %ld\n", st->st_size);
	fprintf(stdout,"uid:   %d\n", st->st_uid);
	fprintf(stdout,"gid:   %d\n", st->st_gid);
	fprintf(stdout,"atime: %ld\n", st->st_atime);
	fprintf(stdout,"mtime: %ld\n", st->st_mtime);
	fprintf(stdout,"ctime: %ld\n", st->st_ctime);
	fflush(stdout);
}

#endif
